Posts

Image Resize in Asp .Net Core. | Asp.Net Core 3.1 | Discover Vibes

Image
  Hello guys, let's learn how to do image resize in Asp.Net Core.   Step 1: Let's create Controller class and create its constructor and add " IHostingEnviromnet " interface. Step 2: Install " System.Drawing.Common " nuget package. Step 3: Back-end controller logic is in below. public class ImageController : Controller     {         private readonly IHostingEnvironment _hostingEnvironment;         public ImageController(IHostingEnvironment hostingEnvironment)         {             _hostingEnvironment = hostingEnvironment;         }         public IActionResult ImageResize()         {             return View();         }         [HttpPost]         public IActionResult ImageResize(IFormFile file)         {             int height = 400;             int width = 400;             string path = Path.Combine(_hostingEnvironment.WebRootPath, "Image", "resized.jpg");             Image image = Image.FromStream(file.OpenReadStream(), true, true);    

How to Generate Script of Database With Data And Without Data

Image
Step 1: Connect your SQL server. Step 2: Select the database in which you want to take backup with the script. Step 3: Right-click in the database, go to the "tasks" option and select "Generate Script" option. Step 4: Select the next button Step 5: Choose an option, If you want all tables, views, and store procedures (like all DB objects) then select the first option, and if your requirement is for selected DB objected then you can choose the second option. click the next button. Step 6: On the next page, you can see multiple choices. 1> If you want one file for all scripts then select the first option which is " Single file ". 2> If you want to generate a file with multiple database objects then select " Single file per object ". 3> Choose your local file path and add the file name. 4> Select the " Unicode text " button. 5> If you want to save a file in the clipboard then select " Save to Clipboard ". 6> If